using System;
using System.ComponentModel;
using System.Data;
using System.Runtime.Serialization;

namespace MinCultura.Sipa.DataAccess.EntidadesArtes
{
	/// <summary>
	/// A custom serializable dataset containing 
	/// </summary>
	[Serializable()]
	[DesignerCategory("code")]


	/// <summary>Class for handling datasets</summary>  
		public class EntidadUbicacionData : DataTable
	{
		///
		/// Constants for table and fields mapping
		///
		public const string ART_ENTIDAD_UBICACION_TABLE = "ART_ENTIDAD_UBICACION";

		public const string ENT_ID_FIELD = "ENT_ID";
		public const string ZOP_ID_FIELD = "ZOP_ID";
		public const string ZON_ID_FIELD = "ZON_ID";
		public const string ARE_ID_FIELD = "ARE_ID";
		public const string ENT_DIRECCION_FIELD = "ENT_DIRECCION";
		public const string ENT_DIRECCION_CORRESPONDENCIA_FIELD = "ENT_DIRECCION_CORRESPONDENCIA";
		public const string ENT_SINO_TELEFONO_FIELD = "ENT_SINO_TELEFONO";
		public const string ENT_TELEFONO_FIELD = "ENT_TELEFONO";
		public const string ENT_SINO_FAX_FIELD = "ENT_SINO_FAX";
		public const string ENT_FAX_FIELD = "ENT_FAX";
		public const string ENT_APARTADO_AEREO_FIELD = "ENT_APARTADO_AEREO";
		public const string ENT_SINO_CORREO_ELECTRONICO_ENTIDAD_FIELD = "ENT_SINO_CORREO_ELECTRONICO_ENTIDAD";
		public const string ENT_CORREO_ELECTRONICO_ENTIDAD_FIELD = "ENT_CORREO_ELECTRONICO_ENTIDAD";
		public const string ENT_PAGINA_WEB_FIELD = "ENT_PAGINA_WEB";
		public const string ENT_CIUDAD_FIELD = "ENT_CIUDAD";


		protected EntidadUbicacionData(SerializationInfo info, StreamingContext context)
		{
			//
		}

		public EntidadUbicacionData()
		{
			BuildDataTables();
		}

		/// <summary>
		/// Creates the following datatables: Localidades
		/// </summary>
		private void BuildDataTables()
		{
			this.TableName = ART_ENTIDAD_UBICACION_TABLE;

			Columns.Add(ENT_ID_FIELD, typeof (Decimal));
			Columns[ENT_ID_FIELD].Caption="Id Entidad";

			Columns.Add(ZOP_ID_FIELD, typeof (Int32));
			Columns[ZOP_ID_FIELD].Caption="Id Pais";

			Columns.Add(ZON_ID_FIELD, typeof (String));
			Columns[ZON_ID_FIELD].Caption="Id Municipio";

			Columns.Add(ARE_ID_FIELD, typeof (String));
			Columns[ARE_ID_FIELD].Caption="Area Geografica";

			Columns.Add(ENT_DIRECCION_FIELD, typeof (String));
			Columns[ENT_DIRECCION_FIELD].Caption="Direccion";

			Columns.Add(ENT_DIRECCION_CORRESPONDENCIA_FIELD, typeof (String));
			Columns[ENT_DIRECCION_CORRESPONDENCIA_FIELD].Caption="Direccion Correspondencia";

			Columns.Add(ENT_SINO_TELEFONO_FIELD, typeof (String));
			Columns[ENT_SINO_TELEFONO_FIELD].Caption="Tiene Telefono";

			Columns.Add(ENT_TELEFONO_FIELD, typeof (String));
			Columns[ENT_TELEFONO_FIELD].Caption="Telefono";

			Columns.Add(ENT_SINO_FAX_FIELD, typeof (String));
			Columns[ENT_SINO_FAX_FIELD].Caption="Tiene Fax";

			Columns.Add(ENT_FAX_FIELD, typeof (String));
			Columns[ENT_FAX_FIELD].Caption="Fax";

			Columns.Add(ENT_APARTADO_AEREO_FIELD, typeof (String));
			Columns[ENT_APARTADO_AEREO_FIELD].Caption="Apartado Aereo";

			Columns.Add(ENT_SINO_CORREO_ELECTRONICO_ENTIDAD_FIELD, typeof (String));
			Columns[ENT_SINO_CORREO_ELECTRONICO_ENTIDAD_FIELD].Caption="Tiene Correo Electronico";

			Columns.Add(ENT_CORREO_ELECTRONICO_ENTIDAD_FIELD, typeof (String));
			Columns[ENT_CORREO_ELECTRONICO_ENTIDAD_FIELD].Caption="Correo Electronico";

			Columns.Add(ENT_PAGINA_WEB_FIELD, typeof (String));
			Columns[ENT_PAGINA_WEB_FIELD].Caption="Pagina Web";

			Columns.Add(ENT_CIUDAD_FIELD, typeof (String));
			Columns[ENT_CIUDAD_FIELD].Caption="Nombre Ciudad";
		}

		/// <summary>
		/// Add a new row to the table
		/// </summary>
		/// <param name="row">Dataset row
		public void addEntidadUbicacion(DataRow row)
		{
			this.Rows.Add(row);
		}

	}

}